package com.example.rabbitmq.consumer;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Consumer;

/**
 * <p>
 * description
 * </p>
 *
 * @author luanmingbin@byteplan.com
 * @since 2024/8/30 15:02
 */
@Configuration
public class MsgConsumer3 {
    @Bean
    public Consumer<String> consumer3() {
        System.out.println("consumer3");
        return msg -> {
            System.out.println("consumer3: 在消费消息[" + msg + "]");
        };
    }

    @Bean
    public Consumer<String> consumer4() {
        System.out.println("consumer4");
        return msg -> {
            System.out.println("consumer4: 在消费消息[" + msg + "]");
        };
    }

}
